package com.amos.muexamclient.sys.controller;

import com.amos.bean.Result;
import com.amos.muexamclient.sys.service.dto.SysPostDTO;
import com.amos.muexamclient.sys.service.SysPostService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.amos.muexamcore.core.BasePageController;
import com.amos.muexamcore.core.BasePageService;

/**
 * Copyright © 2018 五月工作室. All rights reserved.
 *
 * @Package com.amos.muexamclient.sys.controller
 * @ClassName SysPostController
 * @Description TODO
 * @Author Amos
 * @Modifier
 * @Date 2020-03-24 14:35:49
 * @Version 1.0
 **/
@RestController
@RequestMapping(value = "/sys/post")
public class SysPostController extends BasePageController <SysPostDTO> {
    @Autowired
    private SysPostService sysPostService;

    @Override
    public BasePageService <SysPostDTO> getPageService() {
        return sysPostService;
    }


    @GetMapping("/optionselect")
    public Result optionSelect(){
        return Result.success(this.sysPostService.select(new SysPostDTO()));
    }

    @DeleteMapping("/{postIds}")
    public Result remove(@PathVariable String[] postIds){
        return Result.success(this.sysPostService.remove(postIds));
    }
}
